package com.zjzywl.iotSendthings.repository;

import javax.transaction.Transactional;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import com.zjzywl.iotSendthings.entity.JDWPBGMX;
import com.zjzywl.iotSendthings.entity.JDWPBGXX;

@Repository
public interface InsertJDWPBGMXRepository extends JpaRepository<JDWPBGMX,String> {
	 @Modifying
	@Transactional
	@Query("update JDWPBGMX u set u.sjc=:sjc,u.sl=:sl,u.wp=:wp where u.uuid=:uuid")
	void updateJDWPBGMX(@Param("sjc")String sjc, @Param("sl")String sl, @Param("wp")String wp,@Param("uuid")String uuid);
	 @Query(value="select zybh from JDWPBGMX order by id DESC limit  1",nativeQuery=true)
	String findZybh();
	
}
